package com.wd.live.module_base.net;

import android.content.Context;
import android.content.SharedPreferences;

import androidx.annotation.NonNull;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

/**
 * 作者: syh
 * 时间:2024/5/16
 * 描述:
 */
public class HeaderInterceptor implements Interceptor {
    @NonNull
    @Override
    public Response intercept(@NonNull Chain chain) throws IOException {
        Request.Builder builder = chain.request().newBuilder();
        SharedPreferences user = MyApplication.context.getSharedPreferences("user", Context.MODE_PRIVATE);

        builder.addHeader("userId","aaa");
        builder.addHeader("sessionId","aaa");
        return chain.proceed(builder.build());
    }
}
